package cn.b.sky.user.service.impl;

import cn.b.sky.user.dao.TimeZoneDao;
import cn.b.sky.user.service.TimeZoneService;
import cn.b.sky.user.service.model.TimeZone;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("timeZoneService")
public class TimeZoneServiceImpl implements TimeZoneService {

  @Resource
  TimeZoneDao timeZoneDao;

  @Override
  public TimeZone selectTimeZoneByCode(String timeZoneCode) {
    if(StringUtils.isBlank(timeZoneCode)){
      return null;
    }
    return timeZoneDao.selectTimeZoneByCode(timeZoneCode);
  }

  @Override
  public List<TimeZone> selectTimeZone() {

    return timeZoneDao.selectTimeZone();
  }

}
